import {requestApi} from '@/utils/request'
import type { AddressImageResponse, LocalPlayResponse, LocalTravelResponse } from '@/types/found'

// 获取当地玩法
export const getLocalPlayAPI = () => {
    return requestApi<LocalPlayResponse>({
        url: '/local-gameplay',
        method: 'GET'
    })
}

// 根据定位获取当地游记
export const getLocalTravelAPI = (page: number,address: string) => {
    return requestApi<LocalTravelResponse>({
        url: '/local-travel',
        method: 'GET',
        data: {
            page: page,
            address: address
        }
    })
}

// 查询选中的城市所有的游记图片
export const getAddressImageAPI = (page: number,address: string) => {
    return requestApi<AddressImageResponse>({
        url: '/addressImage',
        method: 'GET',
        data: {
            page: page,
            address: address
        }
    })
}